join_to_text

pure function join_to_text([separator: text], [prefix: text], [postfix: text], [limit: integer?], [truncated: text], [transform: (T) -> text]): text

Creates a text from all the elements separated using separator and using the given prefix and postfix if supplied.

If the iterable is large, you can specify a non-negative value of limit, in which case only the first limit of elements will be appended, followed by the truncated text (which defaults to "...").

Since

0.13.10

Parameters

separator

The separator between the elements. The default is ', '

prefix

The text to be prefixed to the resulting text. The default is an empty text

postfix

The text to be appended to the resulting text. The default is an empty text

limit

The maximum number of elements to include in the result. If the number of elements exceeds this limit, the truncated text is appended. The default is null, which means no limit.

truncated

The text to be appended if the number of elements exceeds the specified limit. The default is '...'

transform

A transformation function to apply to each element before joining. The default is to_text for all elements